package com.gun3y.ts.helper;

public class WrapperSparqlHelper {

    public static void main(String[] args) {
	System.out.println(askWrapper("imdb-movie"));
    }

    public static String getWrapperTriples(String name) {
	StringBuilder builder = new StringBuilder();
	builder.append(SparqlHelper.PREFIX_SW).append("\n");
	builder.append(SparqlHelper.PREFIX_RDF).append("\n");
	builder.append(SparqlHelper.PREFIX_WRP).append("\n");
	builder.append("SELECT * WHERE {").append("\n");
	builder.append("\t?wrapper rdf:type wrp:Wrapper.").append("\n");
	builder.append("\t?wrapper wrp:name \"" + name).append("\".\n");
	builder.append("\t?wrapper ?predicate ?object").append("\n");
	builder.append("}\n");
	return builder.toString();
    }

    public static String askWrapper(String name) {
	StringBuilder builder = new StringBuilder();
	builder.append(SparqlHelper.PREFIX_SW).append("\n");
	builder.append(SparqlHelper.PREFIX_RDF).append("\n");
	builder.append(SparqlHelper.PREFIX_WRP).append("\n");
	builder.append("ASK WHERE {").append("\n");
	builder.append("\t?wrapper rdf:type wrp:Wrapper.").append("\n");
	builder.append("\t?wrapper wrp:name \"" + name).append("\".\n");
	builder.append("}\n");
	return builder.toString();
    }

}
